package com.itheima.d7_interface_demo;

import java.util.ArrayList;

public class StudentManager {
    private ArrayList<Student> stu = new ArrayList<>();
    private StudentOperator impl = new StudentOperatorlmol2();

    public StudentManager() {
        stu.add(new Student("小明", '男', 98));
        stu.add(new Student("小红", '女', 91.5));
        stu.add(new Student("小刚", '男', 60.5));
    }

    public void printAll() {
        impl.printAll(stu);
    }

    public void printAvgScore() {
        impl.printAvgScore(stu);
    }
}
